package com.wn32.main.demo14;

public abstract class MyService {
    //骨架逻辑
    public void cook() {
        step1();
        step2();
        step4();
        step3();
    }

    //分步逻辑1
    public void step1() {
        System.out.println("加入适量油，把油烧热。");
    }

    //分步逻辑2
    public void step2() {
        System.out.println("加入食材，进行翻炒。");
    }

    //分步逻辑3
    public abstract void step3();

    //分步逻辑4
    public void step4() {
        System.out.println("装盘,摆得好看一些。");
    }
}
